#pragma once


class CTextureManager: public ITextureManager, public IRenderObjectBase
{
public:
	static TextureId white_texture;

public:
	CTextureManager();
	virtual ~CTextureManager();

	virtual TextureId CreateTexture(uint width, uint height, uint levels, ETextureFormat format, bool dynamic);
	virtual bool			DeleteTexture(TextureId id);
	virtual ITexture*	GetTexture(TextureId id);

private:
	TextureId AddTexture(ITexture* texture);
	TextureId CreateTexture(const char* filepath, uint width, uint height, uint levels, ETextureFormat format, bool dynamic);

private:
	typedef std::map<TextureId, ITexture*> TexturesList;

private:
	TexturesList	m_textures;
	TextureId			m_lastId;
};